{{ if .Site.Params.enablePostTags }}
    {{ with .Params.tags }}
        <div class="post-tags">
            {{ range . }}
                {{ $tag := . }}
                <!-- Work-around for https://github.com/gohugoio/hugo/issues/6546 -->
                {{ $path := (urls.Parse ($tag | urlize)).Path }}
                {{ with $.Site.GetPage (printf `/tags/%s` $path) }}
                    {{ $icon := partial "utils/icon.html" (dict "$" $ "name" $.Site.Params.postTagsIcon "class" "tag-icon") }}
                    <a href="{{ .RelPermalink }}" rel="tag" class="post-tags-link">{{ $icon  }}{{ .LinkTitle | default $path }}</a>
                {{ end }}
            {{ end }}
        </div>
    {{ end }}
{{ end }}
